package d1113r213;

public class Student {
    private String name;
    public Student(String name){
        this.name=name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int add(int[] arr){
        int sum=0;
        for(int i=0;i<arr.length;i++){
            sum+=arr[i];
        }
        return sum;
    }

    public  void play(Ball aa){
        System.out.println(this.name+"在玩"+aa.getBrandName()+"，这个球的价格是"+aa.getPrice());
    }
    public void feed(Animal ani){
        System.out.println(this.name+"在喂"+ani.getName());
        ani.shout();
    }



}
